package com.mceil.mceilbase.base;

import android.app.Application;
import android.graphics.Typeface;
import android.view.Gravity;

import com.kongzue.dialogx.DialogX;
import com.kongzue.dialogx.style.IOSStyle;

import es.dmoral.toasty.Toasty;

public class MceilApplaction extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        Toasty.Config.getInstance()
                .tintIcon(true) // optional (apply textColor also to the icon)
                .setToastTypeface(Typeface.DEFAULT) // optional
                .setTextSize(15) // optional
                .allowQueue(true) // optional (prevents several Toastys from queuing)
                .setGravity(Gravity.CENTER, 0, 0) // optional (set toast gravity, offsets are optional)
                .supportDarkTheme(true) // optional (whether to support dark theme or not)
                .setRTL(true) // optional (icon is on the right)
                .apply();

        initDialog();
    }


    private void initDialog() {
        DialogX.init(this);
        DialogX.globalStyle = IOSStyle.style();
        DialogX.onlyOnePopTip = true;
        DialogX.globalTheme= DialogX.THEME.LIGHT;
    }
}
